#include <stdio.h>


void find_2_largest(const int *a, int n, int *largest, int* sec_largest){
	if (*a < *(a+1)){
		*largest = *(a+1);
		*sec_largest = *a;
	} else {
		*largest = *a;
		*sec_largest = *(a+1);
	}
	for(int i = 0; i < n; ++i){
		if (*(a+i) > *largest){
			*sec_largest = *largest;
			*largest = *(a+i);
		} else if (*(a+i) > *sec_largest){
			*sec_largest = *(a+i);
		}
	}
}

int main(){
		const int a[] = {0, 2, 5, 9, 6};
		int largest, sec_largest;
		find_2_largest(&a, 5, &largest, &sec_largest);
		printf("largest and sec: %d/%d\n", largest, sec_largest);
}

